home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8345 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: dfw.nkn.net!usenet
  2. From: wiersch@fastlane.net (Albert Wiersch)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Crappy or what? Oualline's C++ book
  5. Date: Sat, 17 Feb 1996 01:56:19 GMT
  6. Organization: National Knowledge Network
  7. Message-ID: <4g35ei$cao@dfw.nkn.net>
  8. References: <KRAWCHUK.96Feb15102809@survey.ensu.ucalgary.ca>
  9. NNTP-Posting-Host: fw50.fastlane.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. krawchuk@ensu.ucalgary.ca (Mike Krawchuk) wrote:
  13.  
  14. >An instructor in our department asked me to verify some suspicions he
  15. >had about a book he was considering using as a text - Practical C++
  16. >Programming, by Steve Oualline, published by O'Reilly & Associates Inc.
  17.  
  18. >After reading through it, I came to the conclusion that it is unusable.
  19. >It is filled with typographical errors, errors of fact, and broken code.
  20.  
  21. >As one example, the section on constant pointers (p. 232) is exactly
  22. >wrong in its use of const to modify pointers.  The code labelled
  23. >incorrect compiles under gcc and Borland C++; the code labelled correct
  24. >causes compiler errors.  (as additional verification, Stroustrup's C++
  25. >Programming Language also verifies that Oualline is wrong, pp. 68-9)
  26.  
  27. >The code provided is:
  28.  
  29. >  const char *answer_ptr = "Forty-Two";
  30.  
  31. >  answer_ptr = "Fifty-One"; // Oualline says illegal; Stroustrup, gcc says OK
  32. >  *answer_ptr = 'X'; // Oualline says legal; Stroustrup, gcc says illegal
  33.  
  34. >This is not the only glaring error in the book.  Are we the only ones to
  35. >have noticed these errors, or is there some subtle trick we are missing?
  36. >The O'Reilly web site doesn't have errata for the book, but I can't
  37. >believe everyone else has passed over them!  (we're very disappointed,
  38. >as we've used many O'Reilly books in classes before.)
  39.  
  40. >Mike
  41.  
  42. Borland C aggrees with Stroustrup... Virtually all the programming
  43. books have errors. I guess some just more than others though.
  44.  
  45. Regards,
  46. Albert Wiersch
  47. METRO 817-589-9600
  48. wiersch@fastlane.net
  49. http://www.fastlane.net/~wiersch
  50.  
  51.